﻿<Controls.Common:BasicWindow 
    x:Class="Imagin.NET.Demo.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:Imagin.NET.Demo"
    xmlns:Common="http://imagin.tech/imagin/common"
    xmlns:Controls.Common="http://imagin.tech/imagin/controls/common"
    xmlns:Controls.Extended="http://imagin.tech/imagin/controls/extended"
    mc:Ignorable="d"
    Height="600" 
    Title="Imagin.NET Demo" 
    Width="1200"
    WindowStartupLocation="CenterScreen"
    x:Name="PART_MainWindow">
    <Controls.Common:BasicWindow.Resources>
        <Common:ColorToHexConverter x:Key="ColorToHexConverter"/>
        <Common:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter"/>
        <Common:EnumToCollectionConverter x:Key="EnumToCollectionConverter"/>
        <Common:FileNameConverter x:Key="FileNameConverter"/>
        <Common:FileSizeConverter x:Key="FileSizeConverter"/>
        <Common:Int32ArrayToStringConverter x:Key="Int32ArrayToStringConverter"/>
        <Common:RelativeTimeConverter x:Key="RelativeTimeConverter"/>
        <Common:BrushToColorConverter x:Key="BrushToColorConverter"/>
        <Common:CharacterToStringConverter x:Key="CharacterToStringConverter"/>
        
        <!-- ....................................................................................[Views] -->

        <Controls.Common:AbstractView 
            x:Key="View.List" 
            x:Shared="False">
            <Controls.Common:AbstractView.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}"/>
                </DataTemplate>
            </Controls.Common:AbstractView.ItemTemplate>
        </Controls.Common:AbstractView>

        <GridView
            x:Key="View.Details" 
            x:Shared="False">
            <GridViewColumn Header="Name">
                <GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}"/>
                    </DataTemplate>
                </GridViewColumn.CellTemplate>
            </GridViewColumn>
            <GridViewColumn Header="Type">
                <GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Type}"/>
                    </DataTemplate>
                </GridViewColumn.CellTemplate>
            </GridViewColumn>
            <GridViewColumn Header="Size">
                <GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Size, Converter={StaticResource FileSizeConverter}}"/>
                    </DataTemplate>
                </GridViewColumn.CellTemplate>
            </GridViewColumn>
            <GridViewColumn Header="Accessed">
                <GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Accessed, Converter={StaticResource RelativeTimeConverter}}"/>
                    </DataTemplate>
                </GridViewColumn.CellTemplate>
            </GridViewColumn>
            <GridViewColumn Header="Created">
                <GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Created, Converter={StaticResource RelativeTimeConverter}}"/>
                    </DataTemplate>
                </GridViewColumn.CellTemplate>
            </GridViewColumn>
            <GridViewColumn Header="Modified">
                <GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Modified, Converter={StaticResource RelativeTimeConverter}}"/>
                    </DataTemplate>
                </GridViewColumn.CellTemplate>
            </GridViewColumn>
        </GridView>

        <!-- ....................................................................................[Styles] -->
        
        <Style x:Key="Style.View.Default" TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource {x:Type ListViewItem}}">
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Padding" Value="5" />
            <Setter Property="HorizontalAlignment" Value="Stretch"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
            <Setter Property="Tag" Value="{Binding Path}"/>
            <EventSetter Event="MouseDoubleClick" Handler="OnMouseDoubleClick"/>
        </Style>

        <Style x:Key="Style.View.List" TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource Style.View.Default}">
            <Setter Property="Padding" Value="7,5" />
        </Style>

        <Style x:Key="Style.View.Details" TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource Style.View.Default}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListViewItem">
                        <Border 
                            Name="PART_Border" 
                            Padding="{TemplateBinding Padding}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            Background="{TemplateBinding Background}" 
                            HorizontalAlignment="Stretch"
                            SnapsToDevicePixels="true">
                            <GridViewRowPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Background" Value="#33000000"/>
                                <Setter Property="BorderBrush" Value="Transparent"/>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="False"/>
                                    <Condition Property="IsMouseOver" Value="True"/>
                                </MultiTrigger.Conditions>
                                <Setter Property="Background" Value="#11000000"/>
                                <Setter Property="BorderBrush" Value="Transparent"/>
                            </MultiTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Controls.Common:BasicWindow.Resources>
    <Grid DataContext="{Binding ElementName=PART_MainWindow}">
        <TabControl>
            <TabItem Header="AlignableWrapPanel">
                <Grid Margin="10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Controls.Common:RadioGroup HorizontalAlignment="Center" GroupName="HorizontalContentAlignment">
                        <RadioButton Content="Left" Checked="OnHorizontalContentAlignmentChanged"/>
                        <RadioButton Content="Center" IsChecked="True" Checked="OnHorizontalContentAlignmentChanged"/>
                        <RadioButton Content="Right" Checked="OnHorizontalContentAlignmentChanged"/>
                    </Controls.Common:RadioGroup>
                    <Controls.Common:AlignableWrapPanel 
                        Grid.Row="1"
                        x:Name="PART_AlignableWrapPanel" 
                        HorizontalContentAlignment="Center"
                        Margin="0,10,0,0"/>
                </Grid>
            </TabItem>
            <TabItem Header="AnglePicker">
                <StackPanel 
                    Controls.Common:PanelExtensions.Spacing="0,0,0,10" 
                    Controls.Common:PanelExtensions.TrimLast="True" 
                    Margin="10">
                    <StackPanel 
                        DataContext="{Binding ElementName=PART_AnglePicker}" 
                        Orientation="Horizontal" 
                        Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                        Controls.Common:PanelExtensions.TrimLast="True" 
                        HorizontalAlignment="Center" 
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center"
                        Margin="0,0,0,10">
                        <Label 
                            Content="Angle:"/>
                        <Controls.Common:DoubleUpDown
                            Maximum="180"
                            Minimum="-180"
                            StringFormat="N0"
                            Value="{Binding Angle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <Label 
                            Content="Radians:"/>
                        <Controls.Common:DoubleUpDown
                            Maximum="3.14159"
                            Minimum="-3.14159"
                            StringFormat="N6"
                            Value="{Binding Radians, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                    </StackPanel>
                    <Controls.Extended:AnglePicker
                        x:Name="PART_AnglePicker"
                        Height="100"
                        HorizontalAlignment="Center"
                        Width="100"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="Chips">
                <StackPanel Margin="10" Controls.Common:PanelExtensions.Spacing="0,0,0,10" Controls.Common:PanelExtensions.TrimLast="True">
                    <Label Style="{DynamicResource H2}" Content="ColorChip"/>
                    <Controls.Extended:ColorChip HorizontalAlignment="Left"/>

                    <Label Style="{DynamicResource H2}" Content="GradientChip"/>
                    <Controls.Extended:GradientChip 
                        Height="30"
                        HorizontalAlignment="Left"
                        Width="150">
                        <Controls.Extended:GradientChip.Value>
                            <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                                <GradientStop Offset="0" Color="Red"/>
                                <GradientStop Offset="0.5" Color="Green"/>
                                <GradientStop Offset="1" Color="Yellow"/>
                            </LinearGradientBrush>
                        </Controls.Extended:GradientChip.Value>
                    </Controls.Extended:GradientChip>

                    <Label Style="{DynamicResource H2}" Content="DualColorChip"/>
                    <Controls.Extended:DualColorChip HorizontalAlignment="Left"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="ColorComb">
                <Border Background="{Binding SelectedColor, ElementName=PART_ColorComb, Mode=OneWay, Converter={StaticResource ColorToSolidColorBrushConverter}}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <StackPanel 
                            DataContext="{Binding ElementName=PART_ColorComb}" 
                            Orientation="Horizontal" 
                            Margin="10"
                            Controls.Common:PanelExtensions.Spacing="0,0,15,0" 
                            HorizontalAlignment="Left"
                            Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                            <Label Content="Total Hexagons:"/>
                            <Controls.Common:TextBoxExt 
                                IsReadOnly="True"
                                Text="{Binding TotalChildren, Mode=OneWay}"/>

                            <Label Content="Max Generations:"/>
                            <Controls.Common:IntUpDown 
                                Minimum="1"
                                Maximum="12"
                                Value="{Binding MaxGenerations}"/>

                            <Label Content="Selected Color:"/>
                            <Controls.Common:TextBoxExt 
                                IsReadOnly="True"
                                Text="{Binding SelectedColor, Mode=OneWay, Converter={StaticResource ColorToHexConverter}, StringFormat={}#{0}}"/>

                            <CheckBox Content="Uses Gradients" IsChecked="{Binding UsesGradients}"/>
                            <Label Content="Item Stroke Thickness:"/>

                            <Controls.Common:DoubleUpDown 
                                Value="{Binding ItemStrokeThickness}"
                                Increment="0.01"
                                Minimum="0.01"
                                Maximum="5"/>
                        </StackPanel>
                        <ScrollViewer Grid.Row="1">
                            <Controls.Extended:ColorComb
                                x:Name="PART_ColorComb"
                                Margin="10"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"/>
                        </ScrollViewer>
                    </Grid>
                </Border>
            </TabItem>
            <TabItem Header="ColorPicker">
                <Grid Margin="10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel 
                        DataContext="{Binding ElementName=PART_ColorPicker}"
                        Controls.Common:PanelExtensions.Spacing="0,0,15,0" 
                        Orientation="Horizontal"
                        Margin="0,0,0,10"
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <Button 
                            Content="Select" 
                            HorizontalAlignment="Left"
                            Click="OnColorSelected"/>

                        <Controls.Common:AdvancedComboBox
                            ItemsSource="{Binding Source={x:Type Common:ObserverAngle}, Converter={StaticResource EnumToCollectionConverter}}"
                            SelectedValue="{Binding Observer, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="Observer"/>

                        <Controls.Common:AdvancedComboBox
                            ItemsSource="{Binding Source={x:Type Common:Illuminant}, Converter={StaticResource EnumToCollectionConverter}}"
                            SelectedValue="{Binding Illuminant, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="Illuminant"/>

                        <Controls.Common:AdvancedComboBox
                            ItemsSource="{Binding Source={x:Type Controls.Extended:ColorSelectorRing}, Converter={StaticResource EnumToCollectionConverter}}"
                            SelectedValue="{Binding SelectionRing, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="SelectionRing"/>

                        <Controls.Common:ByteUpDown
                            Text="{Binding Alpha, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="Alpha"/>

                        <Controls.Common:TextBoxExt
                            Text="{Binding ComponentStringFormat, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="ComponentStringFormat"/>

                        <Controls.Common:DoubleUpDown
                            Text="{Binding ComponentValueWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="ComponentValueWidth"/>
                        
                        <Controls.Common:DoubleUpDown
                            Text="{Binding ComponentWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="ComponentWidth"/>

                        <CheckBox 
                            Content="CanUpDownComponents" 
                            IsChecked="{Binding CanUpDownComponents}"/>
                        <CheckBox 
                            Content="IsAsync" 
                            IsChecked="{Binding IsAsync}"/>
                        <CheckBox 
                            Content="ShowSlider" 
                            IsChecked="{Binding ShowSlider}"/>
                        <CheckBox 
                            Content="ShowAlpha" 
                            IsChecked="{Binding ShowAlpha}"/>
                        <CheckBox 
                            Content="Show Components" 
                            IsChecked="{Binding ShowComponents}"/>
                        <CheckBox 
                            Content="ShowNewCurrent" 
                            IsChecked="{Binding ShowNewCurrent}"/>
                    </StackPanel>
                    <Controls.Extended:ColorPicker
                        Grid.Row="1"
                        x:Name="PART_ColorPicker"                
                        BorderBrush="#11000000"
                        BorderThickness="1"
                        Padding="15,10"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"/>
                </Grid>
            </TabItem>
            <TabItem Header="DataGrid">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Controls.Common:MaskedButton
                        Click="OnGetParentPath"
                        HorizontalAlignment="Left"
                        Source="/Images/UpArrow.png"
                        VerticalAlignment="Center"/>

                    <StackPanel 
                        DataContext="{Binding ElementName=PART_DataGrid}" 
                        HorizontalAlignment="Right"
                        Orientation="Horizontal" 
                        Controls.Common:PanelExtensions.Spacing="10,0,0,0" 
                        Controls.Common:PanelExtensions.TrimFirst="True" 
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">

                        <CheckBox
                            Content="AutoSizeColumns"
                            IsChecked="{Binding Path=(Controls.Common:ItemsControlExtensions.AutoSizeColumns), Mode=TwoWay}"/>

                        <CheckBox 
                            Content="CanDragSelect" 
                            IsChecked="{Binding Path=(Controls.Common:ItemsControlExtensions.CanDragSelect), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <CheckBox 
                            Content="CanUserAddRows" 
                            IsChecked="{Binding CanUserAddRows, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <CheckBox
                            Content="DisplayRowNumber"
                            IsChecked="{Binding Path=(Controls.Common:DataGridExtensions.DisplayRowNumber), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <Controls.Common:IntUpDown
                            ToolTip="DisplayRowNumberOffset"
                            Text="{Binding Path=(Controls.Common:DataGridExtensions.DisplayRowNumberOffset), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <Controls.Common:DoubleUpDown
                            ToolTip="DragScrollOffset"
                            Value="{Binding Path=(Controls.Common:ItemsControlExtensions.DragScrollOffset), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <Controls.Common:DoubleUpDown
                            ToolTip="DragScrollTolerance"
                            Value="{Binding Path=(Controls.Common:ItemsControlExtensions.DragScrollTolerance), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <CheckBox
                            Content="IsColumnMenuEnabled"
                            IsChecked="{Binding Path=(Controls.Common:ItemsControlExtensions.IsColumnMenuEnabled), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <CheckBox 
                            Content="ScrollAddedIntoView" 
                            IsChecked="{Binding Path=(Controls.Common:DataGridExtensions.ScrollAddedIntoView), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <CheckBox 
                            Content="SelectNoneOnEmptySpaceClick" 
                            IsChecked="{Binding Path=(Controls.Common:ItemsControlExtensions.SelectNoneOnEmptySpaceClick), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                    </StackPanel>
                    
                    <DataGrid
                        Grid.Row="1"
                        x:Name="PART_DataGrid"
                        Controls.Common:ItemsControlExtensions.AutoSizeColumns="True"
                        CanUserAddRows="True"
                        Controls.Common:DataGridExtensions.DisplayRowNumberOffset="1"
                        Controls.Common:DataGridExtensions.DisplayRowNumber="True"
                        HeadersVisibility="All" 
                        Controls.Common:ItemsControlExtensions.IsColumnMenuEnabled="True"
                        Controls.Common:ItemsControlExtensions.CanDragSelect="True"
                        Controls.Common:DataGridExtensions.ScrollAddedIntoView="True"
                        ItemsSource="{Binding FileSystemCollection, UpdateSourceTrigger=PropertyChanged}"
                        Margin="0,10,0,0">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Name" Binding="{Binding Name}" SortMemberPath="Name"/>
                            <DataGridTextColumn Header="Type" Binding="{Binding Type}" SortMemberPath="Type"/>
                            <DataGridTextColumn Header="Size" Binding="{Binding Size, Converter={StaticResource FileSizeConverter}}" SortMemberPath="Size"/>
                            <DataGridTextColumn Header="Accessed" Binding="{Binding Accessed, Converter={StaticResource RelativeTimeConverter}}" SortMemberPath="Accessed"/>
                            <DataGridTextColumn Header="Created" Binding="{Binding Created, Converter={StaticResource RelativeTimeConverter}}" SortMemberPath="Created"/>
                            <DataGridTextColumn Header="Modified" Binding="{Binding Modified, Converter={StaticResource RelativeTimeConverter}}" SortMemberPath="Modified"/>
                        </DataGrid.Columns>
                        <DataGrid.ItemContainerStyle>
                            <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
                                <Setter Property="Tag" Value="{Binding Path}"/>
                                <EventSetter Event="MouseDoubleClick" Handler="OnMouseDoubleClick"/>
                            </Style>
                        </DataGrid.ItemContainerStyle>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="DirectionPad">
                <StackPanel Margin="10">
                    <Controls.Common:DirectionPad 
                        x:Name="PART_DirectionPad"
                        HorizontalAlignment="Left" 
                        VerticalAlignment="Top"/>
                    <Label 
                        Margin="0,10,0,0"
                        HorizontalAlignment="Left" 
                        VerticalAlignment="Top" 
                        Content="{Binding Direction, ElementName=PART_DirectionPad, StringFormat={}Direction: {0}}"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="EditableLabel">
                <StackPanel Margin="10" Controls.Common:PanelExtensions.Spacing="0,0,0,10" Controls.Common:PanelExtensions.TrimLast="True">
                    <Controls.Common:EditableLabel Text="Edit this on mouse down" HorizontalAlignment="Left" ShowButton="True" MouseEvent="MouseDown"/>
                    <Controls.Common:EditableLabel Text="Edit this on mouse up" ButtonHorizontalAlignment="Right" ShowButton="True"/>
                    <Controls.Common:EditableLabel Text="Edit this on mouse double click" MouseEvent="MouseDoubleClick"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="Extensions">
                <TabControl>
                    <TabItem Header="MenuItem">
                        <StackPanel
                            Controls.Common:PanelExtensions.Spacing="0,0,0,10"
                            Controls.Common:PanelExtensions.TrimLast="True">
                            <StackPanel Orientation="Horizontal">
                                <ComboBox 
                                    x:Name="PART_MenuItemSelectionModeComboBox"
                                    ItemsSource="{Binding Source={x:Type Controls.Common:MenuItemSelectionMode}, Converter={StaticResource EnumToCollectionConverter}}"
                                    SelectedValue="{x:Static Controls.Common:MenuItemSelectionMode.Single}"
                                    ToolTip="MenuItemSelectionMode"/>
                            </StackPanel>
                            <Menu>
                                <MenuItem Header="Click to see options">
                                    <MenuItem
                                        Header="Option 1"
                                        Controls.Common:MenuItemExtensions.GroupName="MenuItemExtensionsOptions"
                                        Controls.Common:MenuItemExtensions.SelectionMode="{Binding SelectedValue, ElementName=PART_MenuItemSelectionModeComboBox, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                        IsCheckable="True"
                                        IsChecked="True"
                                        StaysOpenOnClick="True"/>
                                    <MenuItem
                                        Header="Option 2"
                                        Controls.Common:MenuItemExtensions.GroupName="MenuItemExtensionsOptions"
                                        Controls.Common:MenuItemExtensions.SelectionMode="{Binding SelectedValue, ElementName=PART_MenuItemSelectionModeComboBox, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                        IsCheckable="True"
                                        StaysOpenOnClick="True"/>
                                    <MenuItem
                                        Header="Option 3"
                                        Controls.Common:MenuItemExtensions.GroupName="MenuItemExtensionsOptions"
                                        Controls.Common:MenuItemExtensions.SelectionMode="{Binding SelectedValue, ElementName=PART_MenuItemSelectionModeComboBox, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                        IsCheckable="True"
                                        StaysOpenOnClick="True"/>
                                    <MenuItem
                                        Header="Option 4"
                                        Controls.Common:MenuItemExtensions.GroupName="MenuItemExtensionsOptions"
                                        Controls.Common:MenuItemExtensions.SelectionMode="{Binding SelectedValue, ElementName=PART_MenuItemSelectionModeComboBox, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                        IsCheckable="True"
                                        StaysOpenOnClick="True"/>
                                    <MenuItem
                                        Header="Option 5"
                                        Controls.Common:MenuItemExtensions.GroupName="MenuItemExtensionsOptions"
                                        Controls.Common:MenuItemExtensions.SelectionMode="{Binding SelectedValue, ElementName=PART_MenuItemSelectionModeComboBox, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                        IsCheckable="True"
                                        StaysOpenOnClick="True"/>
                                </MenuItem>
                            </Menu>
                        </StackPanel>
                    </TabItem>
                    <TabItem Header="Panel">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <StackPanel 
                                x:Name="PART_Panel"
                                Orientation="Horizontal"
                                Controls.Common:PanelExtensions.VerticalContentAlignment="Bottom">
                                <Button 
                                    Content="First"
                                    Height="45"/>
                                <Button 
                                    Content="Second"
                                    Height="65"/>
                                <Button 
                                    Content="Third"
                                    Height="50"/>
                                <Button 
                                    Content="Fourth"
                                    Height="80"/>
                            </StackPanel>
                            <StackPanel
                                Grid.Row="1"
                                DataContext="{Binding ElementName=PART_Panel}"
                                Controls.Common:PanelExtensions.Spacing="0,0,0,10" 
                                Controls.Common:PanelExtensions.TrimLast="True"
                                Margin="0,10,0,0">
                                <Label 
                                    Content="Horizontal Content Alignment"
                                    Style="{DynamicResource H2}"/>
                                <ComboBox
                                    ItemsSource="{Binding Source={x:Type HorizontalAlignment}, Converter={StaticResource EnumToCollectionConverter}}"
                                    SelectedValue="{Binding Path=(Controls.Common:PanelExtensions.HorizontalContentAlignment), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                                <Label 
                                    Content="Spacing"
                                    Style="{DynamicResource H2}"/>
                                <StackPanel 
                                    Orientation="Horizontal" 
                                    Controls.Common:PanelExtensions.Spacing="0,0,5,0" 
                                    Controls.Common:PanelExtensions.TrimLast="True"
                                    Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                                    <Label Content="Left"/>
                                    <Controls.Common:DoubleUpDown
                                        x:Name="PART_SpacerThicknessLeft"
                                        Minimum="0"
                                        TextChanged="OnPanelThicknessChanged"
                                        Value="15"/>
                                    <Label Content="Top"/>
                                    <Controls.Common:DoubleUpDown
                                        x:Name="PART_SpacerThicknessTop"
                                        Minimum="0"
                                        TextChanged="OnPanelThicknessChanged"
                                        Value="15"/>
                                    <Label Content="Right"/>
                                    <Controls.Common:DoubleUpDown
                                        x:Name="PART_SpacerThicknessRight"
                                        Minimum="0"
                                        TextChanged="OnPanelThicknessChanged"
                                        Value="15"/>
                                    <Label Content="Bottom"/>
                                    <Controls.Common:DoubleUpDown
                                        x:Name="PART_SpacerThicknessBottom"
                                        Minimum="0"
                                        TextChanged="OnPanelThicknessChanged"
                                        Value="15"/>
                                </StackPanel>

                                <Label 
                                    Content="Trim First"
                                    Style="{DynamicResource H2}"/>
                                <CheckBox 
                                    IsChecked="{Binding Path=(Controls.Common:PanelExtensions.TrimFirst), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                                <Label 
                                    Content="Trim Last"
                                    Style="{DynamicResource H2}"/>
                                <CheckBox 
                                    IsChecked="{Binding Path=(Controls.Common:PanelExtensions.TrimLast), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                                <Label 
                                    Content="Vertical Content Alignment"
                                    Style="{DynamicResource H2}"/>
                                <ComboBox
                                    ItemsSource="{Binding Source={x:Type VerticalAlignment}, Converter={StaticResource EnumToCollectionConverter}}"
                                    SelectedValue="{Binding Path=(Controls.Common:PanelExtensions.VerticalContentAlignment), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                            </StackPanel>
                        </Grid>
                    </TabItem>
                </TabControl>
            </TabItem>
            <TabItem Header="FileBox">
                <StackPanel Margin="10" Controls.Common:PanelExtensions.Spacing="0,0,0,10" Controls.Common:PanelExtensions.TrimLast="True">
                    <StackPanel 
                        DataContext="{Binding ElementName=PART_FileBox}"
                        Orientation="Horizontal"
                        Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                        Controls.Common:PanelExtensions.TrimLast="True"
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <Label Content="ButtonPosition:"/>
                        <ComboBox 
                            SelectedValue="{Binding ButtonPosition, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type Common:LeftRight}, Converter={StaticResource EnumToCollectionConverter}}"/>

                        <Label Content="ButtonToolTip:"/>
                        <Controls.Common:TextBoxExt 
                            Text="{Binding ButtonToolTip, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <Label Content="ButtonVisibility:"/>
                        <ComboBox 
                            SelectedValue="{Binding ButtonVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type Visibility}, Converter={StaticResource EnumToCollectionConverter}}"/>

                        <Label Content="BrowseMode:"/>
                        <ComboBox 
                            SelectedValue="{Binding BrowseMode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type Common:DialogProviderMode}, Converter={StaticResource EnumToCollectionConverter}}"/>

                        <Label Content="BrowseTitle:"/>
                        <Controls.Common:TextBoxExt 
                            Text="{Binding BrowseTitle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <CheckBox 
                            Content="CanBrowse"
                            IsChecked="{Binding CanBrowse}"/>

                        <CheckBox 
                            Content="CanValidate"
                            IsChecked="{Binding CanValidate}"/>

                        <CheckBox 
                            Content="IsValid"
                            IsChecked="{Binding IsValid}"
                            IsEnabled="False"/>
                    </StackPanel>

                    <Controls.Common:FileBox
                        x:Name="PART_FileBox"
                        CanBrowse="True"
                        BrowseMode="OpenFile"
                        BrowseTitle="Open File"
                        ButtonPosition="Right"
                        ButtonToolTip="Click to browse..."
                        ButtonVisibility="Visible"
                        CanValidate="True"
                        VerticalAlignment="Top"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="FlagCheckView">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Text="{Binding Fruits, Mode=OneWay, StringFormat={}Selected fruits: {0}, UpdateSourceTrigger=PropertyChanged}"/>

                    <Controls.Common:FlagCheckView
                        Grid.Row="1"
                        Flags="{Binding Fruits}"
                        Margin="0,10,0,0">
                        <Controls.Common:FlagCheckView.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel/>
                            </ItemsPanelTemplate>
                        </Controls.Common:FlagCheckView.ItemsPanel>
                        <Controls.Common:FlagCheckView.ItemTemplate>
                            <DataTemplate>
                                <CheckBox 
                                    Content="{Binding Value, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                    IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                            </DataTemplate>
                        </Controls.Common:FlagCheckView.ItemTemplate>
                    </Controls.Common:FlagCheckView>
                </Grid>
            </TabItem>
            <TabItem Header="Font">
                <StackPanel
                    Controls.Common:PanelExtensions.Spacing="0,0,0,10" 
                    Controls.Common:PanelExtensions.TrimLast="True">
                    <Label Style="{DynamicResource H2}" Content="FontFamilyBox"/>
                    <CheckBox 
                        DataContext="{Binding ElementName=PART_FontFamilyBox}"
                        Content="Show preview"
                        IsChecked="{Binding ShowPreview}"/>
                    <Controls.Common:FontFamilyBox 
                        x:Name="PART_FontFamilyBox"/>

                    <Label Style="{DynamicResource H2}" Content="FontSizeBox"/>
                    <StackPanel 
                        DataContext="{Binding ElementName=PART_FontSizeBox}"
                        Orientation="Horizontal"
                        Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                        Controls.Common:PanelExtensions.TrimLast="True"
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <Label Content="Wheel Tick:"/>
                        <Controls.Common:DoubleUpDown Text="{Binding WheelTick}"/>

                        <Label Content="Wheel Tick (Min):"/>
                        <Controls.Common:DoubleUpDown Text="{Binding WheelTickMin}"/>

                        <Label Content="Wheel Tick (Max):"/>
                        <Controls.Common:DoubleUpDown Text="{Binding WheelTickMax}"/>
                    </StackPanel>

                    <Controls.Common:FontSizeBox x:Name="PART_FontSizeBox" IsEditable="True"/>

                    <TextBlock 
                        FontFamily="{Binding SelectedItem, Mode=OneWay, ElementName=PART_FontFamilyBox}"
                        FontSize="{Binding Text, Mode=OneWay, ElementName=PART_FontSizeBox}"
                        Foreground="{DynamicResource Brush.Text}"
                        Text="This is sample text"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="Gadgets">
                <StackPanel
                    Controls.Common:PanelExtensions.Spacing="0,0,0,10"
                    Controls.Common:PanelExtensions.TrimLast="True">
                    <Button 
                        Click="ShowClockGadget" 
                        Content="Show Clock"/>
                    <Button 
                        Click="ShowSearchGadget" 
                        Content="Show Search"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="GradientPicker">
                <Grid Margin="10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel 
                        DataContext="{Binding ElementName=PART_ColorPicker}"
                        Controls.Common:PanelExtensions.Spacing="0,0,15,0" 
                        Orientation="Horizontal"
                        Margin="0,0,0,10"
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                    </StackPanel>
                    <Controls.Extended:GradientPicker Grid.Row="1"/>
                </Grid>
            </TabItem>
            <TabItem Header="Line">
                <Grid Margin="10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Controls.Common:Line Stroke="Red"/>
                    <Controls.Common:Line Grid.Column="1" Stroke="Green" Orientation="Vertical"/>
                </Grid>
            </TabItem>
            <TabItem Header="Link">
                <Grid Margin="10">
                    <Controls.Common:Link 
                        Uri="http://www.google.com" 
                        Content="Click to open Google" 
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Foreground="Blue" 
                        Click="OnLinkPressed"/>
                </Grid>
            </TabItem>
            <TabItem Header="ListView">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    
                    <StackPanel 
                        DataContext="{Binding ElementName=PART_ListView}" 
                        HorizontalAlignment="Right"
                        Orientation="Horizontal" 
                        Controls.Common:PanelExtensions.Spacing="10,0,0,0" 
                        Controls.Common:PanelExtensions.TrimFirst="True" 
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <Controls.Common:MaskedButton
                            Click="OnGetParentPath"
                            HorizontalAlignment="Left"
                            Padding="7,0"
                            Source="/Images/UpArrow.png"
                            ToolTip="Go Up"
                            VerticalAlignment="Center"/>
                        
                        <Controls.Common:RadioGroup
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center">
                            <RadioButton Content="Details" IsChecked="True" Checked="OnViewChanged" GroupName="View"/>
                            <RadioButton Content="List" Checked="OnViewChanged" GroupName="View"/>
                        </Controls.Common:RadioGroup>

                        <Controls.Common:DoubleUpDown
                            ToolTip="DragScrollOffset"
                            Value="{Binding Path=(Controls.Common:ItemsControlExtensions.DragScrollOffset), Mode=TwoWay}"/>

                        <Controls.Common:DoubleUpDown
                            ToolTip="DragScrollTolerance"
                            Value="{Binding Path=(Controls.Common:ItemsControlExtensions.DragScrollTolerance), Mode=TwoWay}"/>

                        <CheckBox 
                            Content="CanDragSelect" 
                            IsChecked="{Binding Path=(Controls.Common:ItemsControlExtensions.CanDragSelect), Mode=TwoWay}"/>

                        <CheckBox 
                            Content="IsDirectionalSelectionEnabled" 
                            IsChecked="{Binding Path=(Controls.Common:ListBoxExtensions.IsDirectionalSelectionEnabled), Mode=TwoWay}"/>
                        
                        <CheckBox 
                            Content="SelectNoneOnEmptySpaceClick" 
                            IsChecked="{Binding Path=(Controls.Common:ItemsControlExtensions.SelectNoneOnEmptySpaceClick), Mode=TwoWay}"/>

                        <ComboBox  
                            ItemsSource="{Binding Source={x:Type SelectionMode}, Converter={StaticResource EnumToCollectionConverter}}"
                            SelectedValue="{Binding SelectionMode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="Selection Mode"/>
                    </StackPanel>
                    <ListView
                        Grid.Row="1"
                        x:Name="PART_ListView"
                        Controls.Common:ItemsControlExtensions.CanDragSelect="True"
                        ItemsSource="{Binding FileSystemCollectionView}"
                        Margin="0,10,0,0"
                        ScrollViewer.VerticalScrollBarVisibility="Auto"
                        SelectionMode="Multiple">
                        <ListView.GroupStyle>
                            <GroupStyle HidesIfEmpty="True">
                                <GroupStyle.Panel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel/>
                                    </ItemsPanelTemplate>
                                </GroupStyle.Panel>
                                <GroupStyle.ContainerStyle>
                                    <Style TargetType="{x:Type GroupItem}">
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type GroupItem}">
                                                    <Expander IsExpanded="True" HorizontalAlignment="Stretch">
                                                        <Expander.Header>
                                                            <TextBlock FontSize="15">
                                                                <Run Text="{Binding Name, Mode=OneWay}" Foreground="#007acc"/>
                                                                <Run Text="{Binding ItemCount, Mode=OneWay, StringFormat= ({0})}"/>
                                                            </TextBlock>
                                                        </Expander.Header>
                                                        <ItemsPresenter/>
                                                    </Expander>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </GroupStyle.ContainerStyle>
                            </GroupStyle>
                        </ListView.GroupStyle>
                        <ListView.Style>
                            <Style TargetType="{x:Type ListView}" BasedOn="{StaticResource {x:Type ListView}}">
                                <Setter Property="Background" Value="Transparent"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding ListView, RelativeSource={RelativeSource AncestorType={x:Type local:MainWindow}}}" Value="List">
                                        <Setter Property="View" Value="{DynamicResource View.List}"/>
                                        <Setter Property="ItemTemplate" Value="{Binding View.ItemTemplate, RelativeSource={RelativeSource Self}}"/>
                                        <Setter Property="ItemContainerStyle" Value="{StaticResource Style.View.List}"/>
                                        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding ListView, RelativeSource={RelativeSource AncestorType={x:Type local:MainWindow}}}" Value="Details">
                                        <Setter Property="View" Value="{DynamicResource View.Details}"/>
                                        <Setter Property="ItemContainerStyle" Value="{StaticResource Style.View.Details}"/>
                                        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </ListView.Style>
                    </ListView>
                </Grid>
            </TabItem>
            <TabItem Header="Masked">
                <ScrollViewer Margin="10">
                    <StackPanel Controls.Common:PanelExtensions.Spacing="0,0,0,10" VerticalAlignment="Top">
                        <StackPanel.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="HorizontalAlignment" Value="Center"/>
                                <Setter Property="VerticalAlignment" Value="Center"/>
                            </Style>
                        </StackPanel.Resources>
                        <Label Content="MaskedImage" Style="{DynamicResource H2}"/>
                        <Controls.Common:MaskedImage 
                            Grid.Row="1"
                            Source="/Images/Gear.png" 
                            HorizontalAlignment="Left"/>

                        <Label Grid.Column="1" Content="MaskedButton" Style="{DynamicResource H2}"/>
                        <Controls.Common:MaskedButton 
                            Grid.Row="1"
                            Grid.Column="1"
                            Click="OnMaskedButtonClick"
                            Content="Options"
                            DropDownButtonToolTip="Dropdown tip"
                            DropDownButtonVisibility="Visible"
                            HorizontalAlignment="Left"
                            Source="/Images/Gear.png" 
                            ToolTip="Button tip">
                            <Controls.Common:MaskedButton.DropDown>
                                <ContextMenu>
                                    <MenuItem Header="Option 1"/>
                                    <MenuItem Header="Option 2"/>
                                    <MenuItem Header="Option 3"/>
                                    <MenuItem Header="Option 4"/>
                                    <MenuItem Header="Option 5"/>
                                    <MenuItem Header="Option 6"/>
                                    <MenuItem Header="Option 7"/>
                                    <MenuItem Header="Option 8"/>
                                </ContextMenu>
                            </Controls.Common:MaskedButton.DropDown>
                        </Controls.Common:MaskedButton>

                        <Label Grid.Column="2" Content="MaskedToggleButton" Style="{DynamicResource H2}"/>
                        <Controls.Common:MaskedToggleButton 
                            Grid.Row="1"
                            Grid.Column="2"
                            HorizontalAlignment="Left"
                            Source="/Images/Gear.png" 
                            Content="Options"
                            CheckedToolTip="Options are checked"
                            UncheckedToolTip="Options are not checked"/>

                        <Label Grid.Column="3" Content="MaskedDropDownButton" Style="{DynamicResource H2}"/>
                        <Controls.Common:MaskedDropDownButton 
                            Grid.Row="1"
                            Grid.Column="3"
                            HorizontalAlignment="Left"
                            Source="/Images/Gear.png" 
                            Content="Options">
                            <Controls.Common:MaskedDropDownButton.DropDown>
                                <ContextMenu>
                                    <MenuItem Header="Option 1"/>
                                    <MenuItem Header="Option 2"/>
                                    <MenuItem Header="Option 3"/>
                                    <MenuItem Header="Option 4"/>
                                    <MenuItem Header="Option 5"/>
                                </ContextMenu>
                            </Controls.Common:MaskedDropDownButton.DropDown>
                        </Controls.Common:MaskedDropDownButton>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>
            <TabItem Header="PasswordBox">
                <Grid Margin="10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    
                    <StackPanel 
                        DataContext="{Binding ElementName=PART_PasswordBox}"
                        Orientation="Horizontal" 
                        Controls.Common:PanelExtensions.Spacing="0,0,15,0"
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <CheckBox 
                            Content="Can enter"
                            IsChecked="{Binding CanEnter}"/>
                        
                        <Label Content="Hint:"/>
                        <Controls.Common:TextBoxExt 
                            Text="{Binding Hint, ElementName=PART_PasswordBox, UpdateSourceTrigger=PropertyChanged}" 
                            Placeholder="Enter a hint..."/>
                        
                        <CheckBox
                            Content="Show enter button" 
                            IsChecked="{Binding ShowEnterButton}"/>
                        <CheckBox 
                            Content="Show password" 
                            IsChecked="{Binding ShowPassword}"/>
                    </StackPanel>
                    
                    <Controls.Common:PasswordBox 
                        Grid.Row="1"
                        x:Name="PART_PasswordBox"
                        Placeholder="Enter a password..." 
                        VerticalAlignment="Top" 
                        ShowEnterButton="True" 
                        Hint="What do you think it is? ;(" 
                        Entered="OnPasswordEntered"
                        Margin="0,5,0,0"/>
                </Grid>
            </TabItem>
            <TabItem Header="PropertyGrid">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    
                    <StackPanel 
                        Grid.ColumnSpan="2"
                        DataContext="{Binding ElementName=PART_PropertyGrid}" 
                        Margin="0,0,0,10"
                        Orientation="Horizontal" 
                        Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                        VerticalAlignment="Center"
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <CheckBox 
                            Content="AcceptsNullObjects"
                            IsChecked="{Binding AcceptsNullObjects}"/>

                        <Label Content="DateTimeFormat:"/>
                        <ComboBox/>

                        <CheckBox 
                            Content="CanResizeDescription"
                            IsChecked="{Binding CanResizeDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <ComboBox 
                            SelectedValue="{Binding DescriptionVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type Visibility}, Converter={StaticResource EnumToCollectionConverter}}"
                            ToolTip="DescriptionVisibility"/>

                        <ComboBox 
                            SelectedValue="{Binding FileSizeFormat, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type Common:FileSizeFormat}, Converter={StaticResource EnumToCollectionConverter}}"
                            ToolTip="FileSizeFormat"/>

                        <ComboBox 
                            SelectedValue="{Binding GridLinesVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type DataGridGridLinesVisibility}, Converter={StaticResource EnumToCollectionConverter}}"
                            ToolTip="GridLinesVisibility"/>

                        <ComboBox 
                            SelectedValue="{Binding HeadersVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type DataGridHeadersVisibility}, Converter={StaticResource EnumToCollectionConverter}}"
                            ToolTip="HeadersVisibility"/>

                        <CheckBox 
                            Content="ShowType"
                            IsChecked="{Binding ShowType}"/>
                    </StackPanel> 
                    
                    <ListBox
                        Grid.Row="1"
                        x:Name="PART_ListBox" 
                        Background="Transparent" 
                        BorderThickness="0" 
                        ItemsSource="{Binding PropertyGridSource}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Name, Mode=OneWay}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <Controls.Extended:PropertyGrid 
                        Grid.Column="1" 
                        Grid.Row="1"
                        x:Name="PART_PropertyGrid"
                        SelectedObject="{Binding SelectedValue, Mode=OneWay, ElementName=PART_ListBox}"
                        ShowHeader="True"/>
                </Grid>
            </TabItem>
            <TabItem Header="RadioGroup">
                <Controls.Common:RadioGroup
                    GroupName="Numbers"
                    HorizontalAlignment="Center"
                    Margin="10"
                    VerticalAlignment="Top">
                    <RadioButton Content="First" IsChecked="True"/>
                    <RadioButton Content="Second"/>
                    <RadioButton Content="Third"/>
                    <RadioButton Content="Fourth"/>
                    <RadioButton Content="Fifth"/>
                </Controls.Common:RadioGroup>
            </TabItem>
            <TabItem Header="ResourceDictionaryEditor">
                <Controls.Extended:ResourceDictionaryEditor 
                    Grid.Column="1" 
                    Grid.Row="1"
                    x:Name="PART_ResourceDictionaryEditor"
                    Background="#05000000" 
                    ShowHeader="True"/>
            </TabItem>
            <TabItem Header="SelectionCanvas">
                <Grid>
                    <StackPanel
                        HorizontalAlignment="Center"
                        Controls.Common:PanelExtensions.HorizontalContentAlignment="Center"
                        Controls.Common:PanelExtensions.Spacing="0,0,0,15"
                        Controls.Common:PanelExtensions.TrimLast="True"
                        VerticalAlignment="Center">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock
                                FontSize="32"
                                Foreground="#22000000"
                                Text="{Binding Selection.X, ElementName=PART_SelectionCanvas, Mode=OneWay, StringFormat={}X: {0}}"/>
                            <TextBlock
                                FontSize="32"
                                Foreground="#22000000"
                                Text=", "/>
                            <TextBlock
                                FontSize="32"
                                Foreground="#22000000"
                                Text="{Binding Selection.X, ElementName=PART_SelectionCanvas, Mode=OneWay, StringFormat={}Y: {0}}"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock
                                FontSize="48"
                                Foreground="#007acc"
                                Text="{Binding Selection.Width, ElementName=PART_SelectionCanvas, Mode=OneWay, StringFormat={}Width: {0}}"/>
                            <TextBlock
                                FontSize="48"
                                Foreground="#007acc"
                                Text=", "/>
                            <TextBlock
                                FontSize="48"
                                Foreground="#007acc"
                                Text="{Binding Selection.Height, ElementName=PART_SelectionCanvas, Mode=OneWay, StringFormat={}Height: {0}}"/>
                        </StackPanel>
                    </StackPanel>
                    <Controls.Common:SelectionCanvas
                        x:Name="PART_SelectionCanvas"
                        ClipToBounds="True"/>
                </Grid>
            </TabItem>
            <TabItem Header="SystemTreeView">
                <Controls.Extended:SystemTreeView TreeViewItem.Expanded="SystemTreeView_Expanded">
                    <Controls.Extended:SystemTreeView.ItemContainerStyle>
                        <Style TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}">
                            <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                        </Style>
                    </Controls.Extended:SystemTreeView.ItemContainerStyle>
                    <Controls.Extended:SystemTreeView.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Items, Mode=OneWay}">
                            <StackPanel Orientation="Horizontal">
                                <CheckBox
                                    IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                    IsThreeState="{Binding IsThreeState, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                    Margin="0,0,5,0"/>
                                <TextBlock 
                                    Text="{Binding Path, Converter={StaticResource FileNameConverter}, Mode=OneWay}"/>
                            </StackPanel>
                        </HierarchicalDataTemplate>
                    </Controls.Extended:SystemTreeView.ItemTemplate>
                </Controls.Extended:SystemTreeView>
            </TabItem>
            <TabItem Header="TabbedTree">
                <Grid Margin="10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <StackPanel 
                        DataContext="{Binding ElementName=PART_Tabbed1}"
                        HorizontalAlignment="Center"
                        Margin="0,0,0,10"
                        Orientation="Horizontal" 
                        Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                        Controls.Common:PanelExtensions.TrimLast="True"
                        VerticalAlignment="Center"
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <ComboBox 
                            ItemsSource="{Binding Source={x:Type Controls.Common:ColumnResizeMode}, Converter={StaticResource EnumToCollectionConverter}}"
                            SelectedValue="{Binding ColumnResizeMode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="ColumnResizeMode"/>
                        <ComboBox 
                            ItemsSource="{Binding Source={x:Type Visibility}, Converter={StaticResource EnumToCollectionConverter}}"
                            SelectedValue="{Binding ContentHeaderVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="ContentHeaderVisibility"/>
                    </StackPanel>
                    <StackPanel 
                        Grid.Column="1"
                        DataContext="{Binding ElementName=PART_Tabbed2}"
                        HorizontalAlignment="Center"
                        Margin="0,0,0,10"
                        Orientation="Horizontal" 
                        Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                        Controls.Common:PanelExtensions.TrimLast="True"
                        VerticalAlignment="Center"
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <ComboBox 
                            ItemsSource="{Binding Source={x:Type Controls.Common:ColumnResizeMode}, Converter={StaticResource EnumToCollectionConverter}}"
                            SelectedValue="{Binding ColumnResizeMode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="ColumnResizeMode"/>
                        <ComboBox 
                            ItemsSource="{Binding Source={x:Type Visibility}, Converter={StaticResource EnumToCollectionConverter}}"
                            SelectedValue="{Binding ContentHeaderVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            ToolTip="ContentHeaderVisibility"/>
                    </StackPanel>

                    <Label
                        Grid.Row="1"
                        HorizontalAlignment="Center"
                        Margin="0,0,0,15"
                        Style="{DynamicResource H2}"
                        Content="Static"/>
                    <Controls.Extended:TabbedTree 
                        Grid.Row="2"
                        x:Name="PART_Tabbed1"
                        ContentWidth="70*" 
                        ContentBorderThickness="1" 
                        ContentBorderBrush="#10000000" 
                        ContentHeaderVisibility="Visible"
                        ContentPadding="10,7"
                        Margin="0,0,10,0"
                        MenuBackground="#05000000"
                        MenuPadding="5"
                        MenuWidth="30*"
                        ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <Controls.Extended:TabbedTree.ItemContainerStyle>
                            <Style TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}">
                                <Setter Property="IsExpanded" Value="True"/>
                            </Style>
                        </Controls.Extended:TabbedTree.ItemContainerStyle>
                        <TreeViewItem Header="Option 1">
                            <Controls.Common:ControlExtensions.Content>
                                <Grid>
                                    <TextBlock 
                                        FontSize="32"
                                        Text="Content 1"/>
                                </Grid>
                            </Controls.Common:ControlExtensions.Content>
                        </TreeViewItem>
                        <TreeViewItem Header="Option 2">
                            <Controls.Common:ControlExtensions.Content>
                                <Grid>
                                    <TextBlock 
                                        FontSize="32"
                                        Text="Content 2"/>
                                </Grid>
                            </Controls.Common:ControlExtensions.Content>
                        </TreeViewItem>
                        <TreeViewItem Header="Option 3">
                            <Controls.Common:ControlExtensions.Content>
                                <Grid>
                                    <TextBlock 
                                        FontSize="32"
                                        Text="Content 3"/>
                                </Grid>
                            </Controls.Common:ControlExtensions.Content>
                        </TreeViewItem>
                        <TreeViewItem Header="Option 4">
                            <Controls.Common:ControlExtensions.Content>
                                <Grid>
                                    <TextBlock 
                                        FontSize="32"
                                        Text="Content 4"/>
                                </Grid>
                            </Controls.Common:ControlExtensions.Content>
                        </TreeViewItem>
                        <TreeViewItem Header="Option 5">
                            <Controls.Common:ControlExtensions.Content>
                                <Grid>
                                    <TextBlock 
                                        FontSize="32"
                                        Text="Content 5"/>
                                </Grid>
                            </Controls.Common:ControlExtensions.Content>
                        </TreeViewItem>
                    </Controls.Extended:TabbedTree>

                    <Label
                        Grid.Column="1"
                        Grid.Row="1"
                        HorizontalAlignment="Center"
                        Margin="0,0,0,15"
                        Style="{DynamicResource H2}"
                        Content="Dynamic"/>
                    <Controls.Extended:TabbedTree 
                        Grid.Column="1"
                        Grid.Row="2"
                        x:Name="PART_Tabbed2"
                        ContentBorderBrush="#10000000" 
                        ContentBorderThickness="1" 
                        ContentPadding="10"
                        ContentWidth="70*" 
                        ItemsSource="{Binding FileSystemCollection, UpdateSourceTrigger=PropertyChanged}" 
                        MenuBackground="#05000000"
                        MenuPadding="5"
                        MenuWidth="30*"
                        ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <Controls.Extended:TabbedTree.ContentTemplate>
                            <DataTemplate>
                                <ScrollViewer>
                                    <StackPanel Controls.Common:PanelExtensions.Spacing="0,0,0,10" Controls.Common:PanelExtensions.TrimLast="True">
                                        <Label 
                                            Content="Name:"
                                            FontWeight="Bold"/>
                                        <Label Content="{Binding Path, Converter={StaticResource FileNameConverter}}"/>

                                        <Label Content="Path:"
                                            FontWeight="Bold"/>
                                        <Label Content="{Binding Path}"/>

                                        <Label Content="Size:"
                                            FontWeight="Bold"/>
                                        <Label Content="{Binding Size, Converter={StaticResource FileSizeConverter}}"/>

                                        <Label Content="Accessed:"
                                            FontWeight="Bold"/>
                                        <Label Content="{Binding Accessed, Converter={StaticResource RelativeTimeConverter}}"/>

                                        <Label Content="Created:"
                                            FontWeight="Bold"/>
                                        <Label Content="{Binding Created, Converter={StaticResource RelativeTimeConverter}}"/>

                                        <Label Content="Modified:"
                                            FontWeight="Bold"/>
                                        <Label Content="{Binding Modified, Converter={StaticResource RelativeTimeConverter}}"/>
                                    </StackPanel>
                                </ScrollViewer>
                            </DataTemplate>
                        </Controls.Extended:TabbedTree.ContentTemplate>
                        <Controls.Extended:TabbedTree.ItemContainerStyle>
                            <Style TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}">
                                <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                            </Style>
                        </Controls.Extended:TabbedTree.ItemContainerStyle>
                        <Controls.Extended:TabbedTree.ItemTemplate>
                            <HierarchicalDataTemplate ItemsSource="{Binding Items}">
                                <TextBlock Text="{Binding Name}"/>
                            </HierarchicalDataTemplate>
                        </Controls.Extended:TabbedTree.ItemTemplate>
                    </Controls.Extended:TabbedTree>
                </Grid>
            </TabItem>
            <TabItem Header="TextBoxExt">
                <StackPanel Controls.Common:PanelExtensions.Spacing="0,0,0,10" Margin="10">
                    <Label Style="{DynamicResource H2}" Content="TextBoxExt"/>
                    <StackPanel DataContext="{Binding ElementName=PART_TextBoxExt}" Controls.Common:PanelExtensions.Spacing="0,0,10,0" Orientation="Horizontal" VerticalAlignment="Center" Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                        <Label Content="Placeholder:"/>
                        <Controls.Common:TextBoxExt Text="{Binding Placeholder, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                        <CheckBox Content="Select All On Focus" IsChecked="{Binding SelectAllOnFocus}"/>
                        <CheckBox Content="Select All On Triple Click" IsChecked="{Binding SelectAllOnTripleClick}"/>
                        <CheckBox Content="Show Clear Button" IsChecked="{Binding CanUserClear}"/>
                    </StackPanel>
                    <Controls.Common:TextBoxExt x:Name="PART_TextBoxExt" Text="" Placeholder="Enter text here"/>

                    <Label Style="{DynamicResource H2}" Content="AlphaNumericBox"/>
                    <Controls.Common:AlphaNumericBox Text="Whole integers and letters 0 1 2 3 4 5 6"/>

                    <Label Style="{DynamicResource H2}" Content="RegexBox"/>
                    <StackPanel
                        Orientation="Horizontal"
                        Controls.Common:PanelExtensions.Spacing="0,0,10,0">
                        <Label Content="Pattern:"/>
                        <Controls.Common:TextBoxExt
                            Text="{Binding Pattern, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ElementName=PART_RegexBox}"/>
                    </StackPanel>
                    <Controls.Common:RegexBox x:Name="PART_RegexBox"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="TokenView">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <Controls.Common:TokenView 
                        Grid.RowSpan="2"
                        x:Name="PART_TokenView"
                        Margin="0,0,10,0"
                        VerticalAlignment="Top">
                        Bob;Joseph;Sally;Matilda;Ralph;Brittany;Luna;Ann;
                        <Controls.Common:TokenView.TokenStyle>
                            <Style TargetType="{x:Type Controls.Common:TokenButton}" BasedOn="{StaticResource {x:Type Controls.Common:TokenButton}}">
                                <Setter Property="ContentTemplate">
                                    <Setter.Value>
                                        <DataTemplate>
                                            <StackPanel Orientation="Horizontal">
                                                <Controls.Common:MaskedImage
                                                    Source="/Images/Tag.png"/>
                                                <TextBlock 
                                                    Margin="10,0,0,0"
                                                    Text="{Binding Mode=OneWay}"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Controls.Common:TokenView.TokenStyle>
                    </Controls.Common:TokenView>

                    <Label 
                        Grid.Column="1"
                        Content="Options"
                        Style="{DynamicResource H2}"/>

                    <ScrollViewer
                        Grid.Column="1"
                        Grid.Row="1"
                        Margin="0,10,0,0">
                        <StackPanel
                            DataContext="{Binding ElementName=PART_TokenView}"
                            Controls.Common:PanelExtensions.Spacing="0,0,0,10">
                            <Label Content="TokensSource:"/>
                            <Controls.Common:TextBoxExt
                                Text="{Binding TokensSource, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                            <Label Content="TokenDelimiter:"/>
                            <Controls.Common:TextBoxExt
                                MaxLength="1"
                                Text="{Binding TokenDelimiter, Converter={StaticResource CharacterToStringConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                            <Label Content="TokenMouseDownAction:"/>
                            <ComboBox 
                                SelectedValue="{Binding TokenMouseDownAction, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                ItemsSource="{Binding Source={x:Type Controls.Common:TokenMouseAction}, Converter={StaticResource EnumToCollectionConverter}}"
                                ToolTip="TokenMouseDownAction"/>

                            <Label Content="TokenTriggers:"/>
                            <Controls.Common:FlagCheckView
                                Flags="{Binding TokenTriggers}">
                                <Controls.Common:FlagCheckView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel/>
                                    </ItemsPanelTemplate>
                                </Controls.Common:FlagCheckView.ItemsPanel>
                                <Controls.Common:FlagCheckView.ItemTemplate>
                                    <DataTemplate>
                                        <CheckBox 
                                    Content="{Binding Value, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                    IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                                    </DataTemplate>
                                </Controls.Common:FlagCheckView.ItemTemplate>
                            </Controls.Common:FlagCheckView>

                            <Controls.Common:Line
                                Orientation="Horizontal"/>
                            
                            <CheckBox 
                                Content="EnableContextMenu"
                                IsChecked="{Binding Path=(Controls.Common:FrameworkElementExtensions.EnableContextMenu), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                            <CheckBox 
                                Content="EnableCopyCommand"
                                IsChecked="{Binding Path=(Controls.Common:TextBoxBaseExtensions.EnableCopyCommand), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                            <CheckBox 
                                Content="EnableCutCommand"
                                IsChecked="{Binding Path=(Controls.Common:TextBoxBaseExtensions.EnableCutCommand), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                            <CheckBox 
                                Content="EnablePasteCommand"
                                IsChecked="{Binding Path=(Controls.Common:TextBoxBaseExtensions.EnablePasteCommand), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                            <Label Content="Tokens:"/>
                            <ListBox
                                ItemsSource="{Binding Tokens, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                MaxHeight="225"/>
                        </StackPanel>
                    </ScrollViewer>
                </Grid>
            </TabItem>
            <TabItem Header="TreeViewComboBox">
                <Grid Margin="10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    
                    <Controls.Common:TreeViewExt 
                        ItemsSource="{Binding HierarchialCollection}"
                        Margin="0,0,5,0"
                        Controls.Common:TreeViewExtensions.SelectionMode="Single"
                        SelectedObject="{Binding SelectedItem, Mode=TwoWay, ElementName=PART_TreeViewComboBox}">
                        <Controls.Common:TreeViewExt.ColumnHeaderTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Header}"/>
                            </DataTemplate>
                        </Controls.Common:TreeViewExt.ColumnHeaderTemplate>
                        <Controls.Common:TreeViewExt.ItemTemplate>
                            <HierarchicalDataTemplate ItemsSource="{Binding Items}">
                                <TextBlock Text="{Binding Name}"/>
                            </HierarchicalDataTemplate>
                        </Controls.Common:TreeViewExt.ItemTemplate>
                    </Controls.Common:TreeViewExt>
                    <Controls.Common:TreeViewComboBox 
                        Grid.Column="1"
                        x:Name="PART_TreeViewComboBox"
                        ItemsSource="{Binding HierarchialCollection}"
                        VerticalAlignment="Top">
                        <Controls.Common:TreeViewComboBox.ItemTemplate>
                            <HierarchicalDataTemplate ItemsSource="{Binding Items}">
                                <TextBlock Text="{Binding Name}"/>
                            </HierarchicalDataTemplate>
                        </Controls.Common:TreeViewComboBox.ItemTemplate>
                        <Controls.Common:TreeViewComboBox.ContentTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Name}"/>
                            </DataTemplate>
                        </Controls.Common:TreeViewComboBox.ContentTemplate>
                    </Controls.Common:TreeViewComboBox>
                </Grid>
            </TabItem>
            <TabItem Header="TreeViewExt">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    
                    <StackPanel 
                        DataContext="{Binding ElementName=PART_TreeViewExt}" 
                        Orientation="Horizontal" 
                        Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                        Controls.Common:PanelExtensions.TrimLast="True" 
                        HorizontalAlignment="Center" 
                        Controls.Common:PanelExtensions.VerticalContentAlignment="Center"
                        Margin="0,10">
                        <Label Content="{Binding Columns.Count, Mode=OneWay}" ContentStringFormat="{}Columns: {0}"/>
                        <Label Content="{Binding SelectedItems.Count, Mode=OneWay}" ContentStringFormat="{}Selected Items: {0}"/>

                        <CheckBox
                            Content="AutoSizeColumns"
                            IsChecked="{Binding Path=(Controls.Common:ItemsControlExtensions.AutoSizeColumns), Mode=TwoWay}"/>

                        <Label Content="Selection Mode:"/>
                        <ComboBox 
                            SelectedValue="{Binding Path=(Controls.Common:TreeViewExtensions.SelectionMode), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type Controls.Common:TreeViewSelectionMode}, Converter={StaticResource EnumToCollectionConverter}}"/>

                        <Label Content="Column Header Visibility:"/>
                        <ComboBox 
                            SelectedValue="{Binding ColumnHeaderVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                            ItemsSource="{Binding Source={x:Type Visibility}, Converter={StaticResource EnumToCollectionConverter}}"/>

                        <CheckBox
                            Content="IsColumnMenuEnabled"
                            IsChecked="{Binding Path=(Controls.Common:ItemsControlExtensions.IsColumnMenuEnabled), Mode=TwoWay}"/>

                        <Controls.Common:TextBoxExt
                            MinWidth="75"
                            Text="{Binding SelectedIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource Int32ArrayToStringConverter}, ConverterParameter=\,}"
                            ToolTip="SelectedIndex"/>
                    </StackPanel>
                    <Controls.Common:TreeViewExt 
                        Grid.Row="1"
                        x:Name="PART_TreeViewExt"
                        ColumnHeaderVisibility="Visible"
                        Controls.Common:ItemsControlExtensions.IsColumnMenuEnabled="True"
                        ItemsSource="{Binding FileSystemCollection, UpdateSourceTrigger=PropertyChanged}"
                        Controls.Common:TreeViewExtensions.SelectionMode="Extended">
                        <Controls.Common:TreeViewExt.ColumnHeaderTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Header}"/>
                            </DataTemplate>
                        </Controls.Common:TreeViewExt.ColumnHeaderTemplate>
                        <Controls.Common:TreeViewExt.Columns>
                            <Controls.Common:TreeViewTextColumn 
                                Header="Name" 
                                MemberPath="Name"
                                MinWidth="200"
                                MaxWidth="325"/>
                            <Controls.Common:TreeViewTextColumn 
                                Header="Type"
                                MemberPath="Type"/>
                            <Controls.Common:TreeViewTextColumn 
                                Converter="{StaticResource FileSizeConverter}"
                                Header="Size"
                                MemberPath="Size"/>
                            <Controls.Common:TreeViewTextColumn 
                                Converter="{StaticResource RelativeTimeConverter}"
                                Header="Accessed"
                                MemberPath="Accessed"/>
                            <Controls.Common:TreeViewTextColumn 
                                Converter="{StaticResource RelativeTimeConverter}"
                                Header="Created"
                                MemberPath="Created"/>
                            <Controls.Common:TreeViewTextColumn 
                                Converter="{StaticResource RelativeTimeConverter}"
                                Header="Modified"
                                MemberPath="Modified"/>
                        </Controls.Common:TreeViewExt.Columns>
                        <Controls.Common:TreeViewExt.ItemTemplate>
                            <HierarchicalDataTemplate ItemsSource="{Binding Items}">
                                <TextBlock Text="{Binding Name}"/>
                            </HierarchicalDataTemplate>
                        </Controls.Common:TreeViewExt.ItemTemplate>
                        <Controls.Common:TreeViewExt.ItemContainerStyle>
                            <Style TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}">
                                <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                            </Style>
                        </Controls.Common:TreeViewExt.ItemContainerStyle>
                    </Controls.Common:TreeViewExt>
                </Grid>
            </TabItem>
            <TabItem Header="UpDown">
                <TabControl>
                    <TabItem Header="DateTimeUpDown">
                        <Grid Margin="10">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Label  
                                Grid.Row="0"
                                Content="DateTimeUpDown"
                                Style="{DynamicResource H2}"/>
                            <Controls.Common:DateTimeUpDown 
                                Grid.Row="1"
                                x:Name="PART_DateTimeUpDown"
                                Margin="0,10,0,0"/>

                            <Label 
                                Grid.Row="2" 
                                Content="Options"
                                Margin="0,10,0,0"
                                Style="{DynamicResource H3}"/>
                            <ScrollViewer 
                                Grid.Row="3"
                                HorizontalScrollBarVisibility="Auto"
                                Margin="0,10,0,0">
                                <Grid 
                                    DataContext="{Binding ElementName=PART_DateTimeUpDown}"
                                    Controls.Common:PanelExtensions.Spacing="0,0,0,10"
                                    Controls.Common:PanelExtensions.TrimLast="True"
                                    Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="25*"/>
                                        <ColumnDefinition Width="75*"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>

                                    <Label 
                                        Grid.Row="0"
                                        Content="SelectedPart"/>
                                    <ComboBox 
                                        Grid.Column="1"
                                        ItemsSource="{Binding Source={x:Type Common:DateTimePart}, Converter={StaticResource EnumToCollectionConverter}}"
                                        SelectedValue="{Binding SelectedPart, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                                    <Label 
                                        Grid.Row="1"
                                        Content="Value"/>
                                    <Controls.Common:TextBoxExt 
                                        Grid.Column="1"
                                        Grid.Row="1"
                                        Text="{Binding Value, Mode=OneWay}" 
                                        IsReadOnly="True"/>

                                    <Label 
                                        Grid.Row="2"
                                        Content="Minimum"/>
                                    <Controls.Common:DateTimeUpDown 
                                        Grid.Column="1"
                                        Grid.Row="2"
                                        Value="{Binding Minimum}"/>

                                    <Label 
                                        Grid.Row="3"
                                        Content="Maximum"/>
                                    <Controls.Common:DateTimeUpDown 
                                        Grid.Column="1"
                                        Grid.Row="3"
                                        Value="{Binding Maximum}"/>

                                    <Label 
                                        Grid.Row="4"
                                        Content="Major Change"/>
                                    <Controls.Common:IntUpDown 
                                        Grid.Column="1"
                                        Grid.Row="4"
                                        Value="{Binding MajorChange}" Minimum="1" Maximum="2500"/>

                                    <Label 
                                        Grid.Row="5"
                                        Content="String Format"/>
                                    <Controls.Common:TextBoxExt 
                                        Grid.Column="1"
                                        Grid.Row="5"
                                        Text="{Binding StringFormat, UpdateSourceTrigger=PropertyChanged}"/>

                                    <CheckBox 
                                        Grid.Column="1"
                                        Grid.Row="6"
                                        Content="Show Dropdown"
                                        IsChecked="{Binding IsDropDownOpen, Mode=TwoWay}"/>

                                    <Label 
                                        Grid.Row="7"
                                        Content="Dropdown Animation"/>
                                    <ComboBox 
                                        Grid.Column="1"
                                        Grid.Row="7"
                                        ItemsSource="{Binding Source={x:Type PopupAnimation}, Converter={StaticResource EnumToCollectionConverter}}"
                                        SelectedValue="{Binding DropDownAnimation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                                    <Label 
                                        Grid.Row="8"
                                        Content="Dropdown Placement"/>
                                    <ComboBox 
                                        Grid.Column="1"
                                        Grid.Row="8"
                                        ItemsSource="{Binding Source={x:Type PlacementMode}, Converter={StaticResource EnumToCollectionConverter}}"
                                        SelectedValue="{Binding DropDownPlacement, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                                    <CheckBox 
                                        Grid.Column="1"
                                        Grid.Row="9"
                                        Content="Dropdown Stays Open"
                                        IsChecked="{Binding StaysOpen, Mode=TwoWay}"/>

                                    <CheckBox 
                                        Grid.Column="1"
                                        Grid.Row="10"
                                        Content="Dropdown Stays Open On Selection"
                                        IsChecked="{Binding StaysOpenOnSelection, Mode=TwoWay}"/>

                                    <Label 
                                        Grid.Row="11"
                                        Content="Dropdown Stretch"/>
                                    <ComboBox 
                                        Grid.Column="1"
                                        Grid.Row="11"
                                        ItemsSource="{Binding Source={x:Type Stretch}, Converter={StaticResource EnumToCollectionConverter}}"
                                        SelectedValue="{Binding DropDownStretch, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                                </Grid>
                            </ScrollViewer>
                        </Grid>
                    </TabItem>
                    <TabItem Header="Misc">
                        <ScrollViewer HorizontalScrollBarVisibility="Auto">
                            <StackPanel Margin="10" Controls.Common:PanelExtensions.Spacing="0,0,0,10" Controls.Common:PanelExtensions.TrimLast="True">
                                <Label Style="{DynamicResource H2}" Content="ByteUpDown"/>
                                <StackPanel 
                                    DataContext="{Binding ElementName=PART_ByteUpDown}" 
                                    Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                                    Orientation="Horizontal" 
                                    VerticalAlignment="Center"
                                    Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                                    <Label Content="Value"/>
                                    <Controls.Common:TextBoxExt Text="{Binding Value, Mode=OneWay}" IsReadOnly="True"/>
                                    <Label Content="Increment"/>
                                    <Controls.Common:ByteUpDown Value="{Binding Increment}"/>
                                    <Label Content="Minimum"/>
                                    <Controls.Common:ByteUpDown Value="{Binding Minimum}"/>
                                    <Label Content="Maximum"/>
                                    <Controls.Common:ByteUpDown Value="{Binding Maximum}"/>
                                    <Label Content="Major Change"/>
                                    <Controls.Common:IntUpDown Value="{Binding MajorChange}" Minimum="1" Maximum="2500"/>
                                    <Label Content="String Format"/>
                                    <Controls.Common:TextBoxExt Text="{Binding StringFormat, UpdateSourceTrigger=PropertyChanged}"/>
                                </StackPanel>
                                <Controls.Common:ByteUpDown 
                                    x:Name="PART_ByteUpDown" 
                                    StringFormat="N0" 
                                    Increment="1" 
                                    Minimum="0" 
                                    Maximum="255"/>

                                <Label Style="{DynamicResource H2}" Content="DecimalUpDown"/>
                                <StackPanel 
                                    DataContext="{Binding ElementName=PART_DecimalUpDown}" 
                                    Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                                    Orientation="Horizontal" 
                                    Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                                    <Label Content="Value"/>
                                    <Controls.Common:TextBoxExt Text="{Binding Value, Mode=OneWay}" IsReadOnly="True"/>
                                    <Label Content="Increment"/>
                                    <Controls.Common:DecimalUpDown Value="{Binding Increment}" Minimum="-1000000.0" Maximum="1000000.0"/>
                                    <Label Content="Minimum"/>
                                    <Controls.Common:DecimalUpDown Value="{Binding Minimum}" Minimum="-1000000.0" Maximum="1000000.0"/>
                                    <Label Content="Maximum"/>
                                    <Controls.Common:DecimalUpDown Value="{Binding Maximum}" Minimum="-1000000.0" Maximum="1000000.0"/>
                                    <Label Content="Major Change"/>
                                    <Controls.Common:IntUpDown Value="{Binding MajorChange}" Minimum="1" Maximum="2500"/>
                                    <Label Content="String Format"/>
                                    <Controls.Common:TextBoxExt Text="{Binding StringFormat, UpdateSourceTrigger=PropertyChanged}"/>
                                </StackPanel>
                                <Controls.Common:DecimalUpDown x:Name="PART_DecimalUpDown" StringFormat="N3" Increment="10.25"/>

                                <Label Style="{DynamicResource H2}" Content="DoubleUpDown"/>
                                <StackPanel 
                                    DataContext="{Binding ElementName=PART_DoubleUpDown}" 
                                    Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                                    Orientation="Horizontal" 
                                    Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                                    <Label Content="Value"/>
                                    <Controls.Common:TextBoxExt Text="{Binding Value, Mode=OneWay}" IsReadOnly="True"/>
                                    <Label Content="Increment"/>
                                    <Controls.Common:DoubleUpDown Value="{Binding Increment}" Minimum="-1000000" Maximum="1000000"/>
                                    <Label Content="Minimum"/>
                                    <Controls.Common:DoubleUpDown Value="{Binding Minimum}" Minimum="-1000000" Maximum="1000000"/>
                                    <Label Content="Maximum"/>
                                    <Controls.Common:DoubleUpDown Value="{Binding Maximum}" Minimum="-1000000" Maximum="1000000"/>
                                    <Label Content="Major Change"/>
                                    <Controls.Common:IntUpDown Value="{Binding MajorChange}" Minimum="1" Maximum="2500"/>
                                    <Label Content="String Format"/>
                                    <Controls.Common:TextBoxExt Text="{Binding StringFormat, UpdateSourceTrigger=PropertyChanged}"/>
                                </StackPanel>
                                <Controls.Common:DoubleUpDown x:Name="PART_DoubleUpDown" StringFormat="N3" Increment="10.3" Minimum="-1000.0" Maximum="1000.0"/>

                                <Label Style="{DynamicResource H2}" Content="IntUpDown"/>
                                <StackPanel 
                                    DataContext="{Binding ElementName=PART_IntUpDown}" 
                                    Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                                    Orientation="Horizontal" 
                                    VerticalAlignment="Center" 
                                    Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                                    <Label Content="Value"/>
                                    <Controls.Common:TextBoxExt Text="{Binding Value, Mode=OneWay}" IsReadOnly="True"/>
                                    <Label Content="Increment"/>
                                    <Controls.Common:IntUpDown Value="{Binding Increment}" Minimum="-10000" Maximum="10000"/>
                                    <Label Content="Minimum"/>
                                    <Controls.Common:IntUpDown Value="{Binding Minimum}" Minimum="-10000" Maximum="10000"/>
                                    <Label Content="Maximum"/>
                                    <Controls.Common:IntUpDown Value="{Binding Maximum}" Minimum="-10000" Maximum="10000"/>
                                    <Label Content="Major Change"/>
                                    <Controls.Common:IntUpDown Value="{Binding MajorChange}" Minimum="1" Maximum="2500"/>
                                    <Label Content="String Format"/>
                                    <Controls.Common:TextBoxExt Text="{Binding StringFormat, UpdateSourceTrigger=PropertyChanged}"/>
                                </StackPanel>
                                <Controls.Common:IntUpDown x:Name="PART_IntUpDown" StringFormat="N0" Increment="10" Minimum="-100" Maximum="100"/>

                                <Label Style="{DynamicResource H2}" Content="LongUpDown"/>
                                <StackPanel 
                                    DataContext="{Binding ElementName=PART_LongUpDown}" 
                                    Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                                    Orientation="Horizontal" 
                                    Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                                    <Label Content="Value"/>
                                    <Controls.Common:TextBoxExt Text="{Binding Value, Mode=OneWay}" IsReadOnly="True"/>
                                    <Label Content="Increment"/>
                                    <Controls.Common:LongUpDown Value="{Binding Increment}" Minimum="-1000000" Maximum="1000000"/>
                                    <Label Content="Minimum"/>
                                    <Controls.Common:LongUpDown Value="{Binding Minimum}" Minimum="-1000000" Maximum="1000000"/>
                                    <Label Content="Maximum"/>
                                    <Controls.Common:LongUpDown Value="{Binding Maximum}" Minimum="-1000000" Maximum="1000000"/>
                                    <Label Content="Major Change"/>
                                    <Controls.Common:IntUpDown Value="{Binding MajorChange}" Minimum="1" Maximum="2500"/>
                                    <Label Content="String Format"/>
                                    <Controls.Common:TextBoxExt Text="{Binding StringFormat, UpdateSourceTrigger=PropertyChanged}"/>
                                </StackPanel>
                                <Controls.Common:LongUpDown x:Name="PART_LongUpDown" StringFormat="N0" Increment="100" Minimum="-1000000" Maximum="1000000"/>

                                <Label Style="{DynamicResource H2}" Content="ShortUpDown"/>
                                <StackPanel 
                                    DataContext="{Binding ElementName=PART_ShortUpDown}" 
                                    Controls.Common:PanelExtensions.Spacing="0,0,10,0" 
                                    Orientation="Horizontal" 
                                    VerticalAlignment="Center"
                                    Controls.Common:PanelExtensions.VerticalContentAlignment="Center">
                                    <Label Content="Value"/>
                                    <Controls.Common:TextBoxExt Text="{Binding Value, Mode=OneWay}" IsReadOnly="True"/>
                                    <Label Content="Increment"/>
                                    <Controls.Common:ShortUpDown Value="{Binding Increment}" Minimum="-255" Maximum="255"/>
                                    <Label Content="Minimum"/>
                                    <Controls.Common:ShortUpDown Value="{Binding Minimum}" Minimum="-255" Maximum="255"/>
                                    <Label Content="Maximum"/>
                                    <Controls.Common:ShortUpDown Value="{Binding Maximum}" Minimum="-255" Maximum="255"/>
                                    <Label Content="Major Change"/>
                                    <Controls.Common:IntUpDown Value="{Binding MajorChange}" Minimum="1" Maximum="2500"/>
                                    <Label Content="String Format"/>
                                    <Controls.Common:TextBoxExt Text="{Binding StringFormat, UpdateSourceTrigger=PropertyChanged}"/>
                                </StackPanel>
                                <Controls.Common:ShortUpDown x:Name="PART_ShortUpDown" StringFormat="N0" Increment="1" Minimum="-100" Maximum="100"/>
                            </StackPanel>
                        </ScrollViewer>
                    </TabItem>
                </TabControl>
            </TabItem>
        </TabControl>
    </Grid>
</Controls.Common:BasicWindow>
